package com.qzsoft.system.modules.permission.deptJob.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.system.modules.permission.user.dto.UserDept;
import com.qzsoft.system.modules.permission.user.dto.UserJob;
import com.qzsoft.system.repository.sys.entity.SysUserDeptEntity;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * (SysUserDept)表服务接口
 *
 * @author yzz
 * @since 2020-07-30 09:43:15
 */
public interface SysUserDeptService {
    /**
     * 数据分页
     * @param params
     * @return IPage
     */
    IPage<SysUserDeptEntity> page(Map<String, Object> params);

    /**
     * 数据列表
     * @param params
     * @return
     */
    List<SysUserDeptEntity> list(Map<String, Object> params);

    /**
     * 单个数据
     * @param id
     * @return
     */
    SysUserDeptEntity get(String id);

    /**
     * 保存
     * @param entity
     */
    void save(SysUserDeptEntity entity);

    /**
     * 更新
     * @param entity
     */
    void update(SysUserDeptEntity entity);

    /**
     * 批量删除
     * @param ids
     */
    void delete(String[] ids);

    /**
     * 导出Excel
     * @param params
     * @param response
     */
    void exportXls(Map<String, Object> params , HttpServletResponse response);

    UserDept getMainDeptByUsername(String username);

    List<UserDept> getSubDeptByUsername(String username);

    UserJob getMainJobByUsername(String username);

    List<UserJob> getSubJobByUsername(String username);
}